-
Notifications
You must be signed in to change notification settings - Fork 1.5k
JAVA-4320 fix server selection flaky test #1847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
This PR suggests we should change the corresponding specification prose test https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection-tests.md#prose-test. I don't think Node should have just silently deviated from the spec. |
@stIncMale thanks for the feedback, I noticed that dotnet driver doesn't experience flakiness with 10% deviation, the only difference I saw is the threshold value
So I updated the PR to have 10% deviation and increased threshold |
| MongoClientSettings clientSettings = getMongoClientSettingsBuilder() | ||
| .applicationName(appName) | ||
| .applyConnectionString(multiMongosConnectionString) | ||
| // set it to 3000 ms according to specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] The comment can give the impression that only this setting is spec-compliant, while the rest might not be. Should we remove this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing the comment, let's update it to explain the full story:
- our default
localThresholdvalue is 15 ms, which deviates from the default value 3000 ms required by the specification; - such a small
localThresholddisrupts server selection in this probabilistic test enough to make it fail noticeably often.
stIncMale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
JAVA-4320
1. increase the number of operations to 1000 as in NodeJs2. increase the deviation to 15% as in NodeJsIncreased local threshold to 3 seconds